#include <iostream>
#include <unistd.h>
using namespace std;
#include "ThreadPool.hpp"
#include "Task.hpp"


int main()
{
    ThreadPool<Task>* tp=new ThreadPool<Task>(5);
    tp->Start();

    while(true)
    {
        //1.构建任务
        Task t(1,1,'+');
        sleep(1);
        tp->Push(t);
        //2.交给线程池处理
        cout<<"main thread is running..."<<endl;
    }
    return 0;
}